/*
 * @Description: Haier Tv Mw Code
 * @Author: Haier Max
 * @Date: 2024-11-12 14:19:02
 * @LastEditTime: 2024-12-09 15:41:58
 * @LastEditors: Haier Max
 * @FilePath: /mediatek/tv/hardware/mtk_interfaces/hrtvmw/1.0/default/support/HrTvCommon.h
 */

#ifndef __HR_TV_COMMON_H__
#define __HR_TV_COMMON_H__



#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <string>
#include <stdarg.h>
#include <unistd.h>
#include <dirent.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <climits>

#define MI_SUCCESS          0
#define MI_FAILURE          (-1)
#define MI_NULL             NULL
#define MI_UNUSED(x)        ((x) = (x))
#define MI_FALSE  0
#define MI_TRUE   1

#include <stdio.h>
#include <stdlib.h>

//-------------------------------------------------------------------------------------------------
//  System Data Type
//-------------------------------------------------------------------------------------------------
/// data type unsigned char, data length 1 byte
typedef unsigned char                                   MI_U8;      ///< 1 byte
/// data type unsigned short, data length 2 byte
typedef unsigned short                                  MI_U16;     ///< 2 bytes
/// data type unsigned int, data length 4 byte
typedef unsigned int                                    MI_U32;     ///< 4 bytes
/// data type unsigned int, data length 8 byte
typedef unsigned long long                              MI_U64;     ///< 8 bytes
/// data type signed char, data length 1 byte
typedef signed char                                     MI_S8;      ///< 1 byte
/// data type signed short, data length 2 byte
typedef signed short                                    MI_S16;     ///< 2 bytes
/// data type signed int, data length 4 byte
typedef signed int                                      MI_S32;     ///< 4 bytes
/// data type signed int, data length 8 byte
typedef signed long long                                MI_S64;     ///< 8 bytes

/// data type virtual address
typedef MI_U64                                          MI_VIRT;    ///< 8 bytes
/// date type physical address
typedef MI_U64                                          MI_PHY;     ///< 8 bytes

/// data type unsigned int, data length 4 byte
typedef unsigned int                                    MI_UINT;    ///< 4 bytes

/// date type size_t
typedef size_t                                          MI_SIZE;
typedef char                MI_CHAR;
typedef void                MI_VOID;

typedef float               MI_FLOAT;   /* prefix character f */
typedef double              MI_DOUBLE; /* prefix character d */

/// data type null pointer
#ifdef NULL
#undef NULL
#endif
#define NULL                                            0


#define MI_UNUSED(x) ((x) = (x))

//-------------------------------------------------------------------------------------------------
//  Software Data Type
//-------------------------------------------------------------------------------------------------
/// definition for MI_BOOL
typedef unsigned char                                   MI_BOOL;
typedef MI_S32                                          MI_HANDLE;

#ifndef true
/// definition for true
#define true                                            1
/// definition for false
#define false                                           0
#endif

#if !defined(TRUE) && !defined(FALSE)
/// definition for TRUE
#define TRUE                                            1
/// definition for FALSE
#define FALSE                                           0
#endif

typedef int                                             UART_HANDLE;


#endif //__HR_TV_COMMON_H__